Skip to content

Conversation

@gavin-burns-US
Copy link

[Feature] Native BigQuery dataset replication configuration support #1396

Problem

allowing users to specify replica locations and a primary replica when creating datasets. The changes introduce new configuration options, logic for applying replication settings, and validation to ensure correct usage. Additionally, unit tests are added to verify the new replication logic.

Solution

This feature adds native support for configuring BigQuery dataset replication directly in dbt. Users will be able to specify dataset replicas and a primary replica in dbt_project.yml, schema files, or model configs. This removes the need for custom hooks and enables seamless configuration and management of cross-region dataset replicas within dbt workflows. Implementation includes:

dataset_replicas and primary_replica config options in BigqueryConfig (example)
New create_dataset_with_replication method in BigQueryAdapter (see)
Updated create_dataset method in connections.py (see)
Helper functions in dataset.py for replication logic (see)
Macro for schema creation (see)
Unit tests for replication logic (see).

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

Extras

BigQuery-Dataset-Replication-Configuration-Example.md
pr-summary.md

@gavin-burns-US gavin-burns-US requested a review from a team as a code owner October 15, 2025 22:22
@cla-bot cla-bot bot added the cla:yes The PR author has signed the CLA label Oct 15, 2025
@gavin-burns-US
Copy link
Author

@gshank - can u take a look? - first PR into dbt repos --> u had done the BigQuery Grants Configurations

@gavin-burns-US gavin-burns-US changed the title Feature/bigquery/dataset replication config [Feature] Native BigQuery dataset replication configuration support #1396 Oct 15, 2025
add native BigQuery dataset replication configuration support to dbt, allowing users to configure replicas directly in dbt_project.yml, schema files, or model configs without custom hooks.

Add changelog for BigQuery dataset replication feature (#5)

* Add changelog for BigQuery dataset replication feature

* Delete dbt-bigquery/.changes/unreleased/Features-20251015-174021.yaml

* Delete dbt-bigquery/.changes/unreleased/Features-20251015-174436.yaml

* Delete dbt-bigquery/.changes/unreleased/Fixes-20251009-141523.yaml

Update Features-20251015-174512.yaml
@gavin-burns-US gavin-burns-US force-pushed the feature/bigquery/dataset-replication-config branch from cce4e69 to c792716 Compare October 15, 2025 23:07
add native BigQuery dataset replication configuration support to dbt, allowing users to configure replicas directly in dbt_project.yml, schema files, or model configs without custom hooks.

Add changelog for BigQuery dataset replication feature (#5)

* Add changelog for BigQuery dataset replication feature

* Delete dbt-bigquery/.changes/unreleased/Features-20251015-174021.yaml

* Delete dbt-bigquery/.changes/unreleased/Features-20251015-174436.yaml

* Delete dbt-bigquery/.changes/unreleased/Fixes-20251009-141523.yaml

Update Features-20251015-174512.yaml
Enhance the description of BigQuery dataset replication configuration support to specify it as a new configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes The PR author has signed the CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant